package com.onlinemovies.service.implementation;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.onlinemovies.entity.HallDetails;
import com.onlinemovies.repository.extension.HallRepository;
import com.onlinemovies.service.HallService;


@Service("hallService")
@Transactional(readOnly=true)
public class HallServiceImpl implements HallService,Serializable {
	
	@Autowired
	private HallRepository hallRepository;
	
	@Override
	public List<HallDetails> getAll() throws Exception {
		List<HallDetails> hallloc = hallRepository.getAll();
		return hallloc;
	}

	@Override
	public HallDetails doInsert(HallDetails hallDetails) throws Exception {
	hallRepository.merge(hallDetails);
		return null;
	}

}
